Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

203
Views
The ejs code does not give an output [EJS]

I have a problem. I'm writing a panel for my discord bot, I'm using ejs. The server is based on the express and passport library. The problem is that I want to display the name of the mysql database but I am not getting the result in the browser and with other results the result is displayed. Please help. I'm posting the code.

main.ejs

<%= server.guild_id %> <!-- 76593313568....704  -->

<% database.sql("SHOW DATABASES", 0, (rows) => { %>
   <%= rows[0].Database %> <!-- nothing -->
<% }) %> 

dashboard.js - route

const router = require('express').Router()
const database = require('./../database/database.js')

[...]

res.render('dashboard/server/main', {
    guilds: req.user.guilds,
    servers: rows,
    user: req.user,
    admin: false,
    points: 0,
    server: server,
    database: database
})

If I use the console.log code, I can see the database without any problems

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!